<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网络安全态势综合分析报告</title>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <style>
        :root {
            --primary: #2E95F8;
            --secondary: #1B64AA;
            --dark-bg: #060606;
            --card-bg: rgba(8, 26, 48, 0.8);
            --header-bg: #09162F;
            --text-primary: #E9EAEC;
            --text-secondary: #A0A4AB;
            --success: #28a745;
            --warning: #ffc107;
            --danger: #dc3545;
            --info: #17a2b8;
        }

        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: var(--dark-bg);
            color: var(--text-primary);
            line-height: 1.6;
        }

        .page {
            max-width: 1400px;
            margin: 24px auto;
            padding: 0 16px;
        }

        /* 头部样式 */
        .header {
            margin-bottom: 32px;
            padding: 24px;
            background-color: var(--header-bg);
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            border-left: 4px solid var(--primary);
        }

        .header h1 {
            color: var(--primary);
            font-size: 2.2rem;
            margin-bottom: 8px;
        }

        .header p {
            color: var(--text-secondary);
            font-size: 1.1rem;
        }

        /* 布局系统 */
        .row {
            display: flex;
            flex-wrap: wrap;
            gap: 24px;
            margin-bottom: 24px;
        }

        .col {
            flex: 1;
            min-width: 300px;
        }

        /* 卡片样式 */
        .card {
            border-radius: 8px;
            padding: 20px;
            border: 1px solid var(--secondary);
            background: var(--card-bg);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            height: 100%;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
        }

        .card-title {
            margin-bottom: 16px;
            font-size: 1.3rem;
            color: var(--primary);
            border-bottom: 1px solid var(--secondary);
            padding-bottom: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .card-body {
            font-size: 0.95rem;
        }

        /* 概览项样式 */
        .overview {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
        }

        .overview-item {
            flex: 1;
            min-width: 150px;
            padding: 12px;
            background: rgba(16, 42, 77, 0.5);
            border-radius: 6px;
            text-align: center;
        }

        .overview-item .label {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .overview-item .value {
            font-size: 1.8rem;
            font-weight: bold;
            color: var(--primary);
        }

        /* 表格样式 */
        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin: 16px 0;
            font-size: 0.9rem;
        }

        .data-table th, .data-table td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid var(--secondary);
        }

        .data-table th {
            background-color: rgba(27, 100, 170, 0.3);
            color: var(--primary);
            font-weight: 600;
        }

        .data-table tr:hover {
            background-color: rgba(27, 100, 170, 0.1);
        }

        /* 折叠面板 */
        .accordion {
            margin: 16px 0;
        }

        .accordion-item {
            border: 1px solid var(--secondary);
            border-radius: 6px;
            margin-bottom: 8px;
            overflow: hidden;
        }

        .accordion-header {
            padding: 14px 20px;
            background-color: rgba(27, 100, 170, 0.2);
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 600;
        }

        .accordion-header:hover {
            background-color: rgba(27, 100, 170, 0.3);
        }

        .accordion-content {
            padding: 0 20px;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease, padding 0.3s ease;
        }

        .accordion-item.active .accordion-content {
            padding: 20px;
            max-height: 1000px;
        }

        /* 标签样式 */
        .badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: bold;
            text-transform: uppercase;
        }

        .badge-danger {
            background-color: var(--danger);
            color: white;
        }

        .badge-warning {
            background-color: var(--warning);
            color: #212529;
        }

        .badge-success {
            background-color: var(--success);
            color: white;
        }

        .badge-info {
            background-color: var(--info);
            color: white;
        }

        /* 列表样式 */
        .vulnerability-list {
            list-style-type: none;
        }

        .vulnerability-list li {
            padding: 8px 0;
            border-bottom: 1px dashed rgba(27, 100, 170, 0.5);
            display: flex;
            align-items: center;
        }

        .vulnerability-list li:before {
            content: "•";
            color: var(--primary);
            font-weight: bold;
            display: inline-block;
            width: 1em;
            margin-right: 8px;
        }

        /* 响应式调整 */
        @media (max-width: 768px) {
            .col {
                flex: 100%;
            }
            
            .overview-item {
                min-width: 120px;
            }
            
            .header h1 {
                font-size: 1.8rem;
            }
        }

        /* 图表容器 */
        .chart-container {
            position: relative;
            height: 300px;
            width: 100%;
        }

        /* 时间线样式 */
        .timeline {
            position: relative;
            padding-left: 30px;
            margin: 20px 0;
        }

        .timeline:before {
            content: '';
            position: absolute;
            left: 10px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--secondary);
        }

        .timeline-item {
            position: relative;
            margin-bottom: 20px;
        }

        .timeline-item:before {
            content: '';
            position: absolute;
            left: -30px;
            top: 5px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--primary);
            border: 2px solid var(--secondary);
        }

        .timeline-date {
            font-weight: bold;
            color: var(--primary);
            margin-bottom: 5px;
        }

        .timeline-content {
            background: rgba(16, 42, 77, 0.3);
            padding: 12px;
            border-radius: 6px;
            border-left: 3px solid var(--primary);
        }
    </style>
</head>

<body>
    <div class="page">
        <!-- 头部 -->
        <div class="header">
            <h1>网络安全态势综合分析报告</h1>
            <p>基于全面的安全状态信息和趋势分析，识别当前网络环境中的主要风险点</p>
        </div>

        <div class="main">
            <!-- 安全概览 -->
            <div class="row">
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">安全概览</h2>
                        <div class="card-body">
                            <div class="overview">
                                <div class="overview-item">
                                    <div class="label">总资产数量</div>
                                    <div class="value">9,065</div>
                                </div>
                                <div class="overview-item">
                                    <div class="label">弱口令总数</div>
                                    <div class="value">280</div>
                                </div>
                                <div class="overview-item">
                                    <div class="label">高危资产</div>
                                    <div class="value">4</div>
                                </div>
                                <div class="overview-item">
                                    <div class="label">入侵事件</div>
                                    <div class="value">5</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 三列布局 -->
            <div class="row">
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">资产类型分布</h2>
                        <div class="card-body">
                            <div class="chart-container">
                                <canvas id="assetDistributionChart"></canvas>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">弱口令分析</h2>
                        <div class="card-body">
                            <div class="chart-container">
                                <canvas id="weakPasswordChart"></canvas>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">资产漏洞情况</h2>
                        <div class="card-body">
                            <ul class="vulnerability-list">
                                <li>隐藏文件目录检测：通过命令行创建隐藏文件和目录</li>
                                <li>敏感命令执行检测：使用 Grep 命令查找系统上包含 Password 关键字的文件</li>
                                <li>发现系统信息检测：检测 modprobe 配置文件中涉及内核模块的文件事件</li>
                                <li>检测到 Linux tmp 目录程序运行</li>
                                <li>Linux 受限 Shell 通过 Linux 二进制突破</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 两列布局 -->
            <div class="row">
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">入侵攻击事件分析</h2>
                        <div class="card-body">
                            <table class="data-table">
                                <thead>
                                    <tr>
                                        <th>事件类型</th>
                                        <th>出现次数</th>
                                        <th>威胁等级</th>
                                        <th>首次发生时间</th>
                                        <th>最后发生时间</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>Linux tmp 目录程序运行</td>
                                        <td>2</td>
                                        <td><span class="badge badge-warning">低危</span></td>
                                        <td>2025-04-15 14:52:11</td>
                                        <td>2025-04-15 15:02:06</td>
                                    </tr>
                                    <tr>
                                        <td>可疑行为</td>
                                        <td>3</td>
                                        <td><span class="badge badge-danger">中危</span></td>
                                        <td>2025-04-15 14:51:44</td>
                                        <td>2025-04-15 14:52:25</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">高风险资产</h2>
                        <div class="card-body">
                            <table class="data-table">
                                <thead>
                                    <tr>
                                        <th>IP 地址</th>
                                        <th>威胁等级</th>
                                        <th>命中次数</th>
                                        <th>主要攻击类型</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>10.254.179.45</td>
                                        <td><span class="badge badge-danger">高危</span></td>
                                        <td>8,153</td>
                                        <td>未明确</td>
                                    </tr>
                                    <tr>
                                        <td>192.168.198.138</td>
                                        <td><span class="badge badge-danger">高危</span></td>
                                        <td>1,648</td>
                                        <td>未明确</td>
                                    </tr>
                                    <tr>
                                        <td>10.254.177.226</td>
                                        <td><span class="badge badge-danger">高危</span></td>
                                        <td>850</td>
                                        <td>SSH 暴力破解成功</td>
                                    </tr>
                                    <tr>
                                        <td>10.254.177.216</td>
                                        <td><span class="badge badge-danger">高危</span></td>
                                        <td>486(两次)</td>
                                        <td>删除 history 文件、SSH 软链接后门</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 安全建议折叠面板 -->
            <div class="row">
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">综合安全建议</h2>
                        <div class="card-body">
                            <div class="accordion">
                                <div class="accordion-item">
                                    <div class="accordion-header">
                                        <span>密码安全加固</span>
                                        <span>+</span>
                                    </div>
                                    <div class="accordion-content">
                                        <h4>强制密码策略</h4>
                                        <ul class="vulnerability-list">
                                            <li>实施最小长度 12 字符要求</li>
                                            <li>必须包含大小写字母、数字和特殊字符</li>
                                            <li>禁止使用前 1000 常见密码</li>
                                        </ul>
                                        
                                        <h4>密码管理改进</h4>
                                        <ul class="vulnerability-list">
                                            <li>部署企业级密码管理工具</li>
                                            <li>对 Base64 编码密码实施加盐哈希存储</li>
                                            <li>定期(90 天)强制密码更换</li>
                                        </ul>
                                        
                                        <h4>多因素认证</h4>
                                        <ul class="vulnerability-list">
                                            <li>对所有关键系统实施 MFA</li>
                                            <li>优先采用 TOTP 或硬件令牌方式</li>
                                        </ul>
                                    </div>
                                </div>
                                
                                <div class="accordion-item">
                                    <div class="accordion-header">
                                        <span>入侵防护强化</span>
                                        <span>+</span>
                                    </div>
                                    <div class="accordion-content">
                                        <h4>主机加固</h4>
                                        <ul class="vulnerability-list">
                                            <li>对高危主机(如 10.254.179.45)立即隔离检查</li>
                                            <li>限制/tmp 目录执行权限</li>
                                            <li>部署文件完整性监控(FIM)系统</li>
                                        </ul>
                                        
                                        <h4>SSH 安全增强</h4>
                                        <ul class="vulnerability-list">
                                            <li>禁用密码认证，仅允许密钥认证</li>
                                            <li>限制 SSH 访问源 IP</li>
                                            <li>配置 fail2ban 防止暴力破解</li>
                                        </ul>
                                    </div>
                                </div>
                                
                                <div class="accordion-item">
                                    <div class="accordion-header">
                                        <span>实施路线图</span>
                                        <span>+</span>
                                    </div>
                                    <div class="accordion-content">
                                        <div class="timeline">
                                            <div class="timeline-item">
                                                <div class="timeline-date">0-7 天 (紧急处置)</div>
                                                <div class="timeline-content">
                                                    1. 隔离高危主机<br>
                                                    2. 重置所有弱密码<br>
                                                    3. 禁用受影响 SSH 服务
                                                </div>
                                            </div>
                                            <div class="timeline-item">
                                                <div class="timeline-date">8-30 天 (短期加固)</div>
                                                <div class="timeline-content">
                                                    1. 部署基础监控<br>
                                                    2. 实施密码策略<br>
                                                    3. 关键系统 MFA 部署
                                                </div>
                                            </div>
                                            <div class="timeline-item">
                                                <div class="timeline-date">1-3 月 (中期改进)</div>
                                                <div class="timeline-content">
                                                    1. 网络分段实施<br>
                                                    2. 漏洞管理流程建立<br>
                                                    3. SOC 团队组建
                                                </div>
                                            </div>
                                            <div class="timeline-item">
                                                <div class="timeline-date">3-6 月 (长期优化)</div>
                                                <div class="timeline-content">
                                                    1. 零信任架构实施<br>
                                                    2. 威胁情报整合<br>
                                                    3. 自动化响应建设
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="footer" style="text-align: center; margin-top: 40px; padding: 20px; color: var(--text-secondary);">
            <p>网络安全态势综合分析报告 &copy; 2025 - 生成时间: 2025-04-16</p>
        </div>
    </div>

    <script>
        // 初始化折叠面板
        document.querySelectorAll('.accordion-header').forEach(header => {
            header.addEventListener('click', () => {
                const item = header.parentElement;
                item.classList.toggle('active');
                
                // 切换图标
                const icon = header.querySelector('span:last-child');
                icon.textContent = item.classList.contains('active') ? '-' : '+';
            });
        });

        // 资产分布图表
        const assetCtx = document.getElementById('assetDistributionChart').getContext('2d');
        const assetChart = new Chart(assetCtx, {
            type: 'doughnut',
            data: {
                labels: ['软件应用', 'AI 应用', 'Web 应用框架', 'Web 应用', 'Web 服务', '数据库', 'Web 站点'],
                datasets: [{
                    data: [4109, 4109, 381, 337, 214, 36, 69],
                    backgroundColor: [
                        '#2E95F8',
                        '#1B64AA',
                        '#28a745',
                        '#ffc107',
                        '#dc3545',
                        '#17a2b8',
                        '#6f42c1'
                    ],
                    borderWidth: 1
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        position: 'right',
                        labels: {
                            color: '#E9EAEC'
                        }
                    },
                    tooltip: {
                        callbacks: {
                            label: function(context) {
                                const label = context.label || '';
                                const value = context.raw || 0;
                                const total = context.dataset.data.reduce((a, b) => a + b, 0);
                                const percentage = Math.round((value / total) * 100);
                                return `${label}: ${value} (${percentage}%)`;
                            }
                        }
                    }
                }
            }
        });

        // 弱口令图表
        const passwordCtx = document.getElementById('weakPasswordChart').getContext('2d');
        const passwordChart = new Chart(passwordCtx, {
            type: 'bar',
            data: {
                labels: ['antiy@123', 'password', '123123', '123456', 'testtest'],
                datasets: [{
                    label: '弱口令使用次数',
                    data: [265, 7, 4, 3, 1],
                    backgroundColor: [
                        'rgba(255, 99, 132, 0.7)',
                        'rgba(54, 162, 235, 0.7)',
                        'rgba(255, 206, 86, 0.7)',
                        'rgba(75, 192, 192, 0.7)',
                        'rgba(153, 102, 255, 0.7)'
                    ],
                    borderColor: [
                        'rgba(255, 99, 132, 1)',
                        'rgba(54, 162, 235, 1)',
                        'rgba(255, 206, 86, 1)',
                        'rgba(75, 192, 192, 1)',
                        'rgba(153, 102, 255, 1)'
                    ],
                    borderWidth: 1
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                scales: {
                    y: {
                        beginAtZero: true,
                        ticks: {
                            color: '#E9EAEC'
                        },
                        grid: {
                            color: 'rgba(27, 100, 170, 0.3)'
                        }
                    },
                    x: {
                        ticks: {
                            color: '#E9EAEC'
                        },
                        grid: {
                            color: 'rgba(27, 100, 170, 0.3)'
                        }
                    }
                },
                plugins: {
                    legend: {
                        labels: {
                            color: '#E9EAEC'
                        }
                    }
                }
            }
        });
    </script>
</body>

</html>